import time,gc,struct
from queue import Queue
import socket
import _thread
import st7789py as st7789
from machine import SPI,Pin,UART


spi = SPI(1, baudrate=40000000, polarity=1, sck=Pin(10), mosi=Pin(8))
tft = st7789.ST7789(spi, 320,240, reset=Pin(6, Pin.OUT), dc=Pin(4, Pin.OUT),cs=Pin(2, Pin.OUT),backlight=Pin(1, Pin.OUT))
tft.rotation(1)

tft.fill(st7789.RED)
